package internal;

import java.util.concurrent.ThreadPoolExecutor;


/** 异步,处理消息
 * 因为底层是使用 ThreadPoolExecutor,不会自动关闭,使用CountDownLatch将其关闭
 *  事件的具体实现
 * Created by DJJ on 2019/3/28.
 */
public class MyAsyncEventBus extends MyEventBus
{

    public MyAsyncEventBus(String busName, MyEventExceptionHandler exceptionHandler, ThreadPoolExecutor executor)
    {
        super(busName, exceptionHandler, executor);
    }


    public MyAsyncEventBus(String busName, ThreadPoolExecutor executor)
    {
        this(busName, null, executor);
    }

    public MyAsyncEventBus(ThreadPoolExecutor executor)
    {
        this("default-async", null, executor);
    }

    public MyAsyncEventBus(MyEventExceptionHandler exceptionHandler, ThreadPoolExecutor executor)
    {
        this("default-async", exceptionHandler, executor);
    }
}
